FROM openjdk:17-jdk-alpine
MAINTAINER sximillions
ARG DB_HOST
ARG DB_PORT
ARG DB_USERNAME
ARG DB_PASSWORD
ARG QING_STOR_ACCESS_KEY
ARG QING_STOR_ACCESS_SECRET
ARG QING_STOR_BUCKET_NAME
ARG QING_STOR_ZONE

ENV TZ=Asia/Shanghai \
    DB_HOST=${DB_HOST} \
    DB_PORT=${DB_PORT} \
    DB_USERNAME=${DB_USERNAME} \
    DB_PASSWORD=${DB_PASSWORD} \
    QING_STOR_ACCESS_KEY=${QING_STOR_ACCESS_KEY} \
    QING_STOR_ACCESS_SECRET=${QING_STOR_ACCESS_SECRET} \
    QING_STOR_BUCKET_NAME=${QING_STOR_BUCKET_NAME} \
    QING_STOR_ZONE=${QING_STOR_ZONE}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ADD ps.jar app.jar
EXPOSE 6201
ENTRYPOINT ["java","-jar","/app.jar"]